package Blog;

public class Test {
    public static void main(String[] args) {
        MyBinaryTree myBinaryTree=new MyBinaryTree();
        MyBinaryTree.TreeNode root=myBinaryTree.createTree();
//        System.out.println("======测试前序遍历=====");
//        myBinaryTree.preOrder(root);
//        System.out.println();
//        System.out.println("======测试中序遍历=====");
//        myBinaryTree.inOrder(root);
//        System.out.println();
        System.out.println("======测试后序遍历=====");
        myBinaryTree.postOrder(root);
        System.out.println();
//        System.out.println("======计算节点个数=====");
//        System.out.println(myBinaryTree.size(root));
//        myBinaryTree.size2(root);
//        System.out.println(myBinaryTree.nodeSize);
//        System.out.println("======计算叶子节点个数=====");
//        System.out.println(myBinaryTree.leafNodeSize(root));
//        myBinaryTree.leafNodeSize2(root);
//        System.out.println(myBinaryTree.leafNodeCount);
//        System.out.println("======计算第k层节点个数=====");
//        System.out.println(myBinaryTree.getKLevelNode(root,3));
//        System.out.println("======计算树高度=====");
//        System.out.println(myBinaryTree.getHeight(root));
//        System.out.println("======查找指定值的节点=====");
//        System.out.println(myBinaryTree.find(root, 'A').val);
//        System.out.println("======测试层序遍历=====");
//        myBinaryTree.levelOrder(root);
//        System.out.println();
//        System.out.println("======判断是否为完全二叉树=====");
//        System.out.println(myBinaryTree.isCompleteTree(root));
//        System.out.println("======测试非递归前序遍历=====");
//        myBinaryTree.preOrderNot(root);
//        System.out.println("======测试非递归中序遍历=====");
//        myBinaryTree.inOrderNot(root);
        System.out.println("======测试非递归后序遍历=====");
        myBinaryTree.postOrderNot(root);
    }
}
